package db.logic;

import java.util.ArrayList;
import java.util.List;
import java.util.Stack;

public class DNA {
	private List<Operator> operators = new ArrayList<Operator>();
	
	public void addOperator(Operator o){
		this.operators.add(o);
	}
	public void addOperator(String name){
		this.operators.add(DefaultOperators.getOperator(name));
	}
	public void addOperator(int value){
		this.operators.add(DefaultOperators.getIntOperator(value));
	}
	
	public void execute(int[] memory, Stack<Integer> intstack, Stack<Boolean> boolstack){
		for(Operator o:operators){
			o.execute(memory, intstack, boolstack);
		}
	}
}
